import axios from '@/utils/request'

const api = {
  getModelInfoList: '/modelInfo/list', // 获取通道列表
  deleteCheckedApi: '/modelInfo/delete', // 删除选中条
  addModelInfoList: '/modelInfo/add', // 添加
  editModelInfoList: '/modelInfo/edit', // 添加
  getModelInfoById: 'modelInfo/getById'
}



// 获取通道列表
export function getModelInfoList (data) {
  return axios({
    url: api.getModelInfoList,
    method: 'post',
    data
  })
}


export function getModelInfoById (data) {
  return axios({
    url: api.getModelInfoById,
    method: 'post',
    data
  })
}

// 删除选中条
export function deleteCheckedApi (data) {
  return axios({
    url: api.deleteCheckedApi,
    method: 'post',
    data
  })
}

// 开始任务
export function startTask (data) {
  return axios({
    url: api.startTaskApi,
    method: 'post',
    data
  })
}

// 停止任务
export function stopTask (data) {
  return axios({
    url: api.stopTaskApi,
    method: 'post',
    data
  })
}

// 添加通道
export function addModelInfoList (data) {
  return axios({
    url: api.addModelInfoList,
    method: 'post',
    data
  })
}

// 编辑通道
export function editModelInfoList (data) {
  return axios({
    url: api.editModelInfoList,
    method: 'post',
    data
  })
}

// 添加星历任务
export function createXingliTask (data) {
  return axios({
    url: api.createXingliTaskApi,
    method: 'post',
    data
  })
}

// 添加侦察任务
export function createZcTask (data) {
  return axios({
    url: api.createZcTaskApi,
    method: 'post',
    data
  })
}
